package com.aurora.app.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.aurora.app.enums.ActionType;
import com.aurora.base.entity.BaseEntity;

@Entity
@Table(name = "tb_weixin_account_history")
public class UserAccountHistory extends BaseEntity {
	//支付者的账号
	private UserAccount weixinUserAccount;
	//收钱者的用户账号
	private UserAccount rewardUserAccount;
	
	// 行为 支出或者收入
	private ActionType action;
	// 说明
	private String actionExplain;
	// 金额
	private BigDecimal balance;
	
	
	@ManyToOne
	@JoinColumn(name="F_REWARDUSERACCOUNT")
	public UserAccount getRewardUserAccount() {
		return rewardUserAccount;
	}
	public void setRewardUserAccount(UserAccount rewardUserAccount) {
		this.rewardUserAccount = rewardUserAccount;
	}
	
	
	@ManyToOne
	@JoinColumn(name = "F_WEIXINUSERACCOUNT")
	public UserAccount getWeixinUserAccount() {
		return this.weixinUserAccount;
	}
	public void setWeixinUserAccount(UserAccount weixinUserAccount) {
		this.weixinUserAccount = weixinUserAccount;
	}
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "F_ACTION")
	public ActionType getAction() {
		return this.action;
	}
	public void setAction(ActionType action) {
		this.action = action;
	}
	@Column(name = "F_ACTIONEXPLAIN")
	public String getActionExplain() {
		return this.actionExplain;
	}
	public void setActionExplain(String actionExplain) {
		this.actionExplain = actionExplain;
	}
	@Column(name = "F_BALANCE")
	public BigDecimal getBalance() {
		return this.balance;
	}
	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

}
